<?php
$this->pageHeader = t('PAGE_TITLE', 'authItem');
$this->pageTitle = t('PAGE_TITLE', 'authItem');
$toolbar = new LGToolbar();
$toolbar->buttonAddNew('500', '430', t('PAGE_TITLE_ADDNEW', 'authItem'));
$toolbar->buttonDelete();
$toolbar->buttonRefresh();
$this->pageToolbar = $toolbar->mergeToolbar();
$this->breadcrumbs=array('System','Authorization' => array('authitem/index')); 
?>



<div id="ccontent">
    <div id="message"></div>    
</div>
<!-- search-form -->
<div class="search-form" >
    <?php
    $this->renderPartial('_search', array(
        'model' => $model,
    ));
    ?>
</div>

<!-- grid -->
<?php
$this->widget('GridView', array(
    'id' => 'DataGrid',
    'dataProvider' => $model->search(),
    'summaryText'=> LGHelpers::getSummary(),
    'columns' => array(
        array(
            'header' => '#',
            'class' => 'CCheckBoxColumn',
            'selectableRows' => '2',
            'id' => 'chkId',
        ),
        array(
            'name' => 'name',
            'htmlOptions' => array('width' => '150px'),
        ),
        array(
            'header' => t('LBL_TYPE', 'authItem'),
            'name' => 'type',
            'value' => '$data->type0->name',
            'sortable'=>TRUE,
            'htmlOptions' => array('width' => '40px', 'align' => 'center'),
        ),
        array(
            'name' => 'description',
            'sortable' => false,
            'htmlOptions' => array('width' => '120px'),
        ),
        array(
            'name' => 'bizrule',
            'sortable' => false,
            'htmlOptions' => array('width' => '120px'),
        ),
        array(
            'name' => 'data',
            'sortable' => false,
            'htmlOptions' => array('width' => '120px'),
        ),
        array(
            'name' => 'update_date',
            'htmlOptions' => array('align' => 'center'),
        ),
        array(
            'name' => 'updated_by',
            'htmlOptions' => array('align' => 'center'),
        ),
        array(
            'header' => t('LBL_ACTION', 'authItem'),
            'class' => 'ButtonColumn',
            'buttons' => array(
                'update' => array('title' => 'Edit Authorization', 'dialog-width'=>'500', 'dialog-height'=>'430')
            )
        ),
    ),
));
?>